﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;
using System.Diagnostics;

namespace testProject
{
    public class CustomCommands
    {
        public static RoutedCommand MyCommand = new RoutedCommand();
        static CustomCommands()
        {
            ApplicationCommands.Close.CanExecuteChanged += new EventHandler(Close_CanExecuteChanged);
        }

        static void Close_CanExecuteChanged(object sender, EventArgs e)
        {
            throw new NotImplementedException();
        }
        
        // ExecutedRoutedEventHandler for the custom color command.
        private void MyCommandExecuted(object sender, ExecutedRoutedEventArgs e)
        {
            object target = e.Source as object;
            Debug.Print(target.ToString());
            Debug.Print("parameter=" + e.Parameter);
            //if (target != null)
            //{
            //}
        }

        // CanExecuteRoutedEventHandler for the custom color command.
        private void MyCommandCanExecute(object sender, CanExecuteRoutedEventArgs e)
        {
            e.CanExecute = true;
        }
    }

}
